﻿using System.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using Simple1.Entity;

namespace Simple1.ViewModel;

public partial class MainViewModel : ObservableObject
{
    public MainViewModel()
    {
        InitUserModuleBar();
    }

    [ObservableProperty] private BindingList<UserModule> _userModules;

    public void InitUserModuleBar()
    {
        _userModules = new BindingList<UserModule>();
        _userModules.Add(new UserModule() { FilePath = "Images/Image1.jpg", UserName = "James Bloor", Content = "What's up", SignTime = "32 min" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image2.jpg", UserName = "Fionn Withehead", Content = "Nice one", SignTime = "2 days" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image3.jpg", UserName = "Damien Bonnard", Content = "Go on in comi", SignTime = "1 weeks" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image4.jpg", UserName = "Aneurin Barnard", Content = "I am coming", SignTime = "2 weeks" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image5.jpg", UserName = "James Bloor", Content = "What's up", SignTime = "32 min" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image6.jpg", UserName = "Fionn Withehead", Content = "Nice one", SignTime = "2 days" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image7.jpg", UserName = "Damien Bonnard", Content = "Go on in comi", SignTime = "1 weeks" });
        _userModules.Add(new UserModule() { FilePath = "Images/Image8.jpg", UserName = "Aneurin Barnard", Content = "I am coming", SignTime = "2 weeks" });
    }
}